package bookshelf;

public class Author {

	private final String name;
	
	public Author(String name) {
		this.name = name;
	}
	
	public String getName() {
		return name;
	}
	
	@Override
	public boolean equals(final Object o) {
		if (!(o instanceof Author))
			return false;
		
		final Author author = (Author)o;
		return this.name.equals(author.name);
	}
	
	@Override
	public int hashCode() {
		return name.hashCode();
	}
}
